// MciPlayer.h: interface for the CMciPlayer class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MCIPLAYER_H__1A6F4767_0187_4403_82E8_8DF59B41442E__INCLUDED_)
#define AFX_MCIPLAYER_H__1A6F4767_0187_4403_82E8_8DF59B41442E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#pragma comment(lib,"winmm.lib")
#include "mmsystem.h"

class CMciPlayer  
{
public:
	void SetPlayPos(DWORD dwPos);
	void SetVolume(DWORD dwVol);
	void SetSafeHand(HWND hWnd);
	void Stop();
	DWORD Play(LPCTSTR strFileName);
	bool  Record(LPCTSTR strFileName);
	DWORD GetCdLen(DWORD dwItem);
	CMciPlayer();
	virtual ~CMciPlayer();
	HWND	m_hWnd ;
	DWORD	m_dwCurDevID ;
	DWORD	m_dwBegin;
	DWORD	m_dwCdLen;
	DWORD	m_dwEnd;
	bool    m_bPlayFlag ;
	bool    m_bRecFlag ;
	char    m_strRecFile[MAX_PATH];
	char    m_strLastPlay[MAX_PATH];
};


int InitMciModule(HWND hParent);
int StopRecordFile();
int RecordFile(LPCTSTR strFileName);
int StartPlayFile(LPCTSTR FileName, INT PercentVol);
int StopPlayFile(void);

#endif // !defined(AFX_MCIPLAYER_H__1A6F4767_0187_4403_82E8_8DF59B41442E__INCLUDED_)
